LRS Search

//Get LRS from coordinates
//Set the coordinates
var lon = 1.6358260968949037;
var lat = 43.39463062273481;

LRS.getLRSFromCoordinates(lon, lat).done(function(lrs) {
	//Here you can use the lrs result;
	onGetLRSFromCoordinates(lrs);
});

//Get coordinates from LRS
//Set a custom object used for the lrs search
var lrsObject = {
	relativeAbscisa: '50',
	prNumber: '4',
	roadName: 'A66'
};
//If isRelative is true then the search distance will be relative to the PR number
var isRelative = true;
	
LRS.getCoordinatesFromLRS(lrsObject, isRelative).done(function(response) {
	//Here you can use the coordinates result
	//For example you can use the coordinates to get the closest image
	onGetCoordinatesFromLRS(response.position);
});

function onGetLRSFromCoordinates(lrs) {
	console.log('lrs: ', lrs);
}

function onGetCoordinatesFromLRS(position) {
	console.log('coordinates: ',position);
}